<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>errorreporter.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">errorreporter.js</span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    <span class='nodesc'>No description.</span>
  </div>
  

        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="local_closure_goog_debug_errorreporter.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/debug/errorreporter.js">Git</a></li>
          </ol>
        </div>
</div>

<h2 class="g-first">File Location</h2>
  <div class="g-section g-tpl-20-80">
    <div class="g-unit g-first">
      <div class="g-c-cell code-label">/goog/debug/errorreporter.js</div>
    </div>
  </div>
<hr/>


  <h2>Classes</h2>
 <div class="fn-constructor">
        <a href="class_goog_debug_ErrorReporter.html">
          goog.debug.ErrorReporter</a><br/>
        <div class="class-details">Constructs an error reporter. Internal Use Only. To install an error
reporter see the  method below.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_debug_ErrorReporter_ExceptionEvent.html">
          goog.debug.ErrorReporter.ExceptionEvent</a><br/>
        <div class="class-details">Event broadcast when an exception is logged.
</div>
 </div>
      
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.debug.ErrorReporter.defaultXhrSender"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.debug.ErrorReporter.</span><span class="entryName">defaultXhrSender<span class="args">(<span class="arg">uri</span>,&nbsp;<span class="arg">method</span>,&nbsp;<span class="arg">content</span>,&nbsp;<span class="arg">opt_headers</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Default implementation of XHR sender interface.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">uri</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">URI to make request to.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">method</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">Send method.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">content</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">Post data.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_headers</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">goog.structs.Map=</span>
        <div class="entryOverview">Map of headers to add to the
    request.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_debug_errorreporter.js.source.html#line218">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.debug.ErrorReporter.install"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.debug.ErrorReporter.</span><span class="entryName">install<span class="args">(<span class="arg">loggingUrl</span>,&nbsp;<span class="arg">opt_contextProvider</span>,&nbsp;<span class="arg">opt_noAutoProtect</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="class_goog_debug_ErrorReporter.html">goog.debug.ErrorReporter</a></span>
      </div>


     <div class="entryOverview">
       Installs an error reporter to catch all JavaScript errors raised.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">loggingUrl</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The URL to which the errors caught will be
    reported.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_contextProvider</span>
        : <span class="type">function(!Error, !Object</span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>,<span class="type"> string></span>)&gt;
        <div class="entryOverview">When a report is to be sent to the server,
    this method will be called, and given an opportunity to modify the
    context object before submission to the server.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_noAutoProtect</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Whether to automatically add handlers for
    onerror and to protect entry points.  If apps have other error reporting
    facilities, it may make sense for them to set these up themselves and use
    the ErrorReporter just for transmission of reports.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="class_goog_debug_ErrorReporter.html">goog.debug.ErrorReporter</a></span>&nbsp;
            The error reporter.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_debug_errorreporter.js.source.html#line201">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>






      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Directory debug</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">File Reference</h2>
            <div id="sideFileIndex" rootPath="" current="/goog/debug/errorreporter.js"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
